﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Default.master" AutoEventWireup="true" CodeBehind="ComplainView.aspx.cs" Inherits="Runda.EShop.SaaS.OrderManage.ComplainView" %>

<%@ Register Src="~/UserControl/LeftMenu.ascx" TagPrefix="uc" TagName="LeftMenu" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHeader" runat="server">
<style type="text/css">
    .box_y
    {
        margin: 5px ;
        padding:5px;
        border-bottom: #ffc43f 1px solid;
        border-left: #ffc43f 1px solid;
        margin-bottom: 10px;
        border-top: #ffc43f 1px solid;
        border-right: #ffc43f 1px solid;
    }
    .box_b
    {
        margin: 5px;
        padding:5px;
        border-bottom: #79ace1 1px solid;
        border-left: #79ace1 1px solid;
        margin-bottom: 10px;
        border-top: #79ace1 1px solid;
        border-right: #79ace1 1px solid;
    }
</style>
<script type="text/javascript">
    var flag = false;
    $(document).ready(function () {
        var maxLength = 500;
        if (document.getElementById('txtContent')) {
            var text = $("#txtContent").val();
            var counter = text.length;
            $("#numtj var").text(maxLength - counter);
            $(document).keyup(function () {
                var text = $("#txtContent").val();
                var counter = text.length;
                $("#numtj var").text(maxLength - counter);

                if ((maxLength - counter) < 0) {
                    flag = false;
                }
                else {
                    flag = true;
                }
            });
        }
    });

    function Check() {
        if ($("#txtContent").val() == '') {
            alert('请输入内容');
            return false;
        }
        if (!flag) {
            alert('字数超出限制');
            return false;
        }
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphLeft" runat="server">
    <uc:LeftMenu runat="server" ID="ucLeftMenu"  TopMenuCode="Func20"/>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMain" runat="server">
<div class="box_y">
<table width="100%">
<tr>
<td style="width:70px">投诉内容：</td>
<td>
    <asp:Literal ID="ltlComplaintContent" runat="server"></asp:Literal>
    </td>
</tr>
<tr>
<td colspan="2" align="right"><asp:Literal ID="ltlComplainter" runat="server"></asp:Literal></td>
</tr>
</table>
</div>

    <asp:Repeater ID="rptReply" runat="server">
    <ItemTemplate>
    <div class='<%# Eval("UserType").ToString() =="Customer" ? "box_y" : "box_b" %>'>
<table width="100%">
<tr>
<td style="width:70px">回复内容：</td>
<td>
    <%# Eval("Content") %>
    </td>
</tr>
<tr>
<td colspan="2" align="right"><%# Eval("ReplyByName")%> <%# Eval("ReplyAt")%></td>
</tr>
</table>
</div>
    </ItemTemplate>
    </asp:Repeater>
    
  <div class="clear"></div>

<asp:Panel runat="server" ID="pnlReply">
    <div class="i_tablebt_xian" style="margin: 10px 0px 0px 0px; width: 100%;">
        <span class="l"><img src="<%=ResolveUrl("~/images/ico/down_16x16.gif")%>" align="absmiddle" />回复</span>
    </div>
  <div class="clear"></div>
  <table cellpadding="3px" cellspacing="3px">
  <tr>
  <td>回复内容</td>
  <td>
      <asp:TextBox ID="txtContent" runat="server" Height="60px" TextMode="MultiLine" ClientIDMode="Static"
          Width="630px"></asp:TextBox>
         <p id="numtj">你还可以输入<var style="color:#C00">--</var>个字符。</p></td>
  </tr>
  <tr>
  <td>&nbsp;</td>
  <td>
      <asp:Button ID="btnSave" runat="server" onclick="btnSave_Click" Text="回复" OnClientClick="return Check();"/>
      &nbsp;
      <asp:Button ID="btnReturn" runat="server" Text="返回" OnClientClick="window.location='ComplainList.aspx';return false;" />
      </td>
  </tr>
  </table>
  </asp:Panel>
</asp:Content>
